package com.jmb.api.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import java.util.Date;

import io.swagger.v3.oas.annotations.media.Schema;
import jakarta.validation.constraints.*;
import lombok.Data;

/**
 * 
 * @TableName t_project
 */
@TableName(value ="t_project")
@Data
public class Project extends BaseEntity {

    /**
     * 项目名称
     */
    @Schema(description = "项目名称")
    @NotNull(message = "项目名称不能为空")
    @Size(min = 1, max = 10, message = "项目名称长度必须为1~10")
    @TableField(value = "name")
    private String name;

    /**
     * 项目描述
     */
    @Schema(description = "项目描述")
    @Size(max = 100, message = "项目描述长度必须小于等于100")
    @TableField(value = "description")
    private String description;



    /**
     * 调试环境
     */
    @Schema(description = "调试环境")
    @NotNull(message = "调试环境protocol不能为空")
    @NotEmpty(message = "调试环境protocol不能为空")
    @Size(max = 30, message = "调试环境protocol长度必须小于等于30")
    @TableField(value = "protocol")
    private String protocol;
    /**
     * 调试环境端口
     */
    @Schema(description = "调试环境端口")
    @NotNull(message = "调试环境port不能为空")
    @Min(value = 1, message = "调试环境端口号错误")
    @Max(value = 65535, message = "调试环境端口号错误")
    @TableField(value = "port")
    private Integer port;
    /**
     * 项目域名
     */
    @Schema(description = "项目域名")
    @NotNull(message = "调试环境host不能为空")
    @NotEmpty(message = "调试环境host不能为空")
    @Size(max = 30, message = "调试环境host长度必须小于等于30")
    @Pattern(regexp = "[a-zA-z0-9.]+", message = "调试环境host格式错误")
    @TableField(value = "domain")
    private String domain;



    /**
     * 开发环境协议
     */
    @Schema(description = "开发环境协议")
    @NotNull(message = "开发环境protocol不能为空")
    @NotEmpty(message = "开发环境protocol不能为空")
    @Size(max = 30, message = "开发环境protocol长度必须小于等于30")
    @TableField(value = "dev_protocol")
    private String devProtocol;
    /**
     * 开发环境端口
     */
    @Schema(description = "开发环境端口")
    @NotNull(message = "开发环境port不能为空")
    @Min(value = 1, message = "开发环境端口号错误")
    @Max(value = 65535, message = "开发环境端口号错误")
    @TableField(value = "dev_port")
    private Integer devPort;
    /**
     * 开发环境域名
     */
    @Schema(description = "开发环境域名")
    @NotNull(message = "开发环境host不能为空")
    @NotEmpty(message = "开发环境host不能为空")
    @Size(max = 30, message = "开发环境host长度必须小于等于30")
    @Pattern(regexp = "[a-zA-z0-9.]+", message = "开发环境host格式错误")
    @TableField(value = "dev_domain")
    private String devDomain;



    /**
     * 测试环境协议
     */
    @Schema(description = "测试环境协议")
    @NotNull(message = "测试环境protocol不能为空")
    @NotEmpty(message = "测试环境protocol不能为空")
    @Size(max = 30, message = "测试环境protocol长度必须小于等于30")
    @TableField(value = "test_protocol")
    private String testProtocol;
    /**
     * 测试环境端口
     */
    @TableField(value = "test_port")
    @NotNull(message = "测试环境port不能为空")
    @Min(value = 1, message = "测试环境端口号错误")
    @Max(value = 65535, message = "测试环境端口号错误")
    private Integer testPort;
    /**
     * 测试环境域名
     */
    @Schema(description = "测试环境域名")
    @NotNull(message = "测试环境host不能为空")
    @NotEmpty(message = "测试环境host不能为空")
    @Size(max = 30, message = "测试环境host长度必须小于等于30")
    @Pattern(regexp = "[a-zA-z0-9.]+", message = "测试环境host格式错误")
    @TableField(value = "test_domain")
    private String testDomain;



    /**
     * 预上线环境协议
     */
    @Schema(description = "预上线环境协议")
    @NotNull(message = "预上线环境protocol不能为空")
    @NotEmpty(message = "预上线环境protocol不能为空")
    @Size(max = 30, message = "预上线环境protocol长度必须小于等于30")
    @TableField(value = "stg_protocol")
    private String stgProtocol;
    /**
     * 预上线环境端口
     */
    @Schema(description = "预上线环境端口")
    @NotNull(message = "预上线环境port不能为空")
    @Min(value = 1, message = "预上线环境端口号错误")
    @Max(value = 65535, message = "预上线环境端口号错误")
    @TableField(value = "stg_port")
    private Integer stgPort;
    /**
     * 预上线环境域名
     */
    @Schema(description = "预上线环境域名")
    @NotNull(message = "预上线环境host不能为空")
    @NotEmpty(message = "预上线环境host不能为空")
    @Size(max = 30, message = "预上线环境host长度必须小于等于30")
    @Pattern(regexp = "[a-zA-z0-9.]+", message = "预上线环境host格式错误")
    @TableField(value = "stg_domain")
    private String stgDomain;



    /**
     * 正式环境协议
     */
    @Schema(description = "正式环境协议")
    @NotNull(message = "正式环境protocol不能为空")
    @NotEmpty(message = "正式环境protocol不能为空")
    @Size(max = 30, message = "正式环境protocol长度必须小于等于30")
    @Pattern(regexp = "[a-zA-z0-9.]+", message = "正式环境host格式错误")
    @TableField(value = "prod_protocol")
    private String prodProtocol;
    /**
     * 正式环境端口
     */
    @Schema(description = "正式环境端口")
    @NotNull(message = "正式环境port不能为空")
    @Min(value = 1, message = "正式环境端口号错误")
    @Max(value = 65535, message = "正式环境端口号错误")
    @TableField(value = "prod_port")
    private Integer prodPort;
    /**
     * 正式环境域名
     */
    @Schema(description = "正式环境域名")
    @NotNull(message = "正式环境host不能为空")
    @NotEmpty(message = "正式环境host不能为空")
    @Size(max = 30, message = "正式环境host长度必须小于等于30")
    @Pattern(regexp = "[a-zA-z0-9.]+", message = "正式环境host格式错误")
    @TableField(value = "prod_domain")
    private String prodDomain;

}